# Maintainer: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
pkgname=py3-pytest-regtest
_pyname=pytest_regtest
pkgver=2.1.1
pkgrel=1
pkgdesc="pytest-regtest is a pytest-plugin for implementing regression tests"
url="https://gitlab.com/uweschmitt/pytest-regtest"
arch="noarch"
license="MIT"
depends="
	py3-pytest
	"
makedepends="
	py3-gpep517
	py3-hatchling
	py3-setuptools
	py3-wheel
	twine
	"
checkdepends="
	py3-pexpect
	py3-tox
	"
subpackages="$pkgname-pyc"
source="
	https://files.pythonhosted.org/packages/source/p/$_pyname/$_pyname-$pkgver.tar.gz
	"
builddir="$srcdir/$_pyname-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages test-env
	test-env/bin/python3 -m installer .dist/*.whl
	test-env/bin/python3 -m pytest tests/test_plugin.py
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
31f5da09d1bfae682caba6eb716cf75f80de8ef0f30893b760d6eee60717b9453b0b3c72a5e706f8b3c84d85ac7a856d4c03632f851c40741a4893a1ca8002fb  pytest_regtest-2.1.1.tar.gz
"
